package com.eugene.element;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;

import com.eugene.enums.EResultType;
import java.util.Collection;
import java.util.Iterator;

public class Synthetic implements Serializable{
	/**
	 * @uml.property  name="fnProdId"
	 */
	private String fnProdId;
	/**
	 * @uml.property  name="refFnProd"
	 * @uml.associationEnd  
	 */
	private FnProduct refFnProd;
	/**
	 * @uml.property  name="compWeight"
	 */
	private double compWeight;

	public Synthetic(){
		
	}
	

	/**
	 * @return
	 * @uml.property  name="fnProdId"
	 */
	public String getFnProdId() {
		return fnProdId;
	}

	/**
	 * @param fnProdId
	 * @uml.property  name="fnProdId"
	 */
	public void setFnProdId(String fnProdId) {
		this.fnProdId = fnProdId;
	}


	/**
	 * @return
	 * @uml.property  name="refFnProd"
	 */
	public FnProduct getRefFnProd() {
		return refFnProd;
	}


	/**
	 * @param refFnProd
	 * @uml.property  name="refFnProd"
	 */
	public void setRefFnProd(FnProduct refFnProd) {
		this.refFnProd = refFnProd;
	}


	/**
	 * @return
	 * @uml.property  name="compWeight"
	 */
	public double getCompWeight() {
		return compWeight;
	}


	/**
	 * @param compWeight
	 * @uml.property  name="compWeight"
	 */
	public void setCompWeight(double compWeight) {
		this.compWeight = compWeight;
	}

	@Override
	public boolean equals( Object other){
		return super.equals(other);
	}
	@Override
	public int hashCode(){
		return super.hashCode();
	}
	
//*************************End of getter and Setter **********************

	public double getFnMeasure(FnCalendar baseDate,EResultType rstType){
		return rstType.getOperatedValue(refFnProd.getFnMeasure(baseDate,rstType),compWeight);
	}

}
